package com.lanou3g.demo.mapper;

import com.lanou3g.demo.entity.ExRoleinfo;
import com.lanou3g.demo.entity.RoleInfo;
import com.lanou3g.demo.entity.RoleModule;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    List<ExRoleinfo> findAll(int start);
    ExRoleinfo findTotal();

    boolean deleteOne(int roleId);
    boolean deleteMiddle(int roleId);

    int insertRoleInfo(String name);
    int insertRoleModule(@Param(value = "roleId") Integer roleId,@Param(value = "list") List<Integer> moduleId);
    RoleInfo selectNameById(String name);

    int updateName(@Param(value = "roleId") int roleId,@Param(value = "name") String name);
    RoleModule findAllModule(int roleId);
    int insertModule(@Param(value = "roleId") int roleId,@Param(value = "list") List<Integer> moduleId);
    boolean deleteModule(@Param(value = "roleId") int roleId,@Param(value = "list") List<Integer> moduleId);
}
